<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
/*******basic*******/
//$this->model('task')->test();
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$footernav =array(
		array('title'=>'首页','icon'=>'icon-shouye','action'=>'jy_renwushop/index/'),
		array('title'=>'集市','icon'=>'icon-viewlist','action'=>'jy_renwushop/renwu.index/'),
		array('title'=>'订单','icon'=>'icon-manageorder','action'=>'jy_renwushop/renwuorder/'),
		array('title'=>'钱包','icon'=>'icon-dixiaofei','action'=>'jy_renwushop/myfee/'),
		array('title'=>'我的','icon'=>'icon-wo1','action'=>'jy_renwushop/myhome/'),
	);
	$bankuai =array(
		array('title'=>'新手教程','img'=>'../addons/jy_renwushop/resource/images/help.png','action'=>'jy_weishop/news.list/'),
		array('title'=>'综合任务','img'=>'../addons/jy_renwushop/resource/images/all.png','action'=>'jy_renwushop/renwu.index/'),
		array('title'=>'每日签到','img'=>'../addons/jy_renwushop/resource/images/sign.png','action'=>'core/member.qiandao/'),
		array('title'=>'金币抽奖','img'=>'../addons/jy_renwushop/resource/images/chou.png','action'=>'jy_bigwheel/game/'),
		array('title'=>'闲玩','img'=>'../addons/jy_renwushop/resource/images/xianwan.png','action'=>'jy_renwushop/renwu.index/'),
		array('title'=>'爱变现','img'=>'../addons/jy_renwushop/resource/images/bianxian.png','action'=>'jy_renwushop/renwu.index/'),
		array('title'=>'闲娱','img'=>'../addons/jy_renwushop/resource/images/yule.png','action'=>'jy_renwushop/renwu.index/'),
		array('title'=>'众人帮','img'=>'../addons/jy_renwushop/resource/images/bang.png','action'=>'jy_renwushop/renwu.index/'),
		array('title'=>'商家入驻','img'=>'../addons/jy_weishop/resource/images/tejia.png','action'=>'jy_merch/register/'),
	);
	$hdps =array(
		array('title'=>'首页','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp01.jpg','action'=>''),
		array('title'=>'全部','picurl'=>'../addons/jy_weishop/resource/images/mobile-hdp02.jpg','action'=>''),
	);
	$return['item']=$this->plugin_setting('basic');
	$return['item']['footernav']=$return['item']['footernav']?:$footernav;
	$return['item']['bankuai']=$return['item']['bankuai']?:$bankuai;
	$return['item']['hdps']=$return['item']['hdps']?:$hdps;
	$return['item']['dandesc']=$return['item']['dandesc']?:'1、任务赏金已托管到平台，赚钱有保障；';
	$return['item']['renwudesc']=$return['item']['renwudesc']?:'仅限新用户';
	$return['item']['renwurules']=$return['item']['renwurules']?:'1、任务赏金已托管到平台，赚钱有保障；';
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基本信息',
				'list'=>array(
					array('type'=>'string','title'=>'网站名称','name'=>'title'),
					array('type'=>'image','title'=>'网站logo','name'=>'logo'),
					array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
					array('type'=>'image','title'=>'分享图片','name'=>'share_image'),
					array('type'=>'string','title'=>'分享描述','name'=>'share_desc'),
				)
			),
			array(
				'title'=>'一些设置',
				'list'=>array(
					array('type'=>'unitstring','unit'=>'%','title'=>'做单扣佣','name'=>'order_kou'),
					array('type'=>'switch','title'=>'需要审核才能发布任务？','name'=>'renwuup_shenhe'),
				)
			),
			array(
				'title'=>'一些说明',
				'list'=>array(
					array('type'=>'richtext','title'=>'做单说明','name'=>'dandesc','help'=>''),
					array('type'=>'richtext','title'=>'任务说明','name'=>'renwudesc','help'=>''),
					array('type'=>'richtext','title'=>'任务规则','name'=>'renwurules','help'=>''),
				)
			),
			array(
					'title'=>'界面UI配色',
					'list'=>array(
						array('type'=>'color_pool','title'=>'选择配色方案','name'=>'syscolor','help'=>''),
						array('type'=>'colorpicker','title'=>'站点颜色','name'=>'syscolor','help'=>'自定义系统颜色系，默认： #18bc9c'),
						array('type'=>'phone_tpl','name'=>'syscolor'),
					)
			),
			array(
				'title'=>'幻灯片',
					'list'=>array(
						array(
							'type'=>'array',
							'name'=>'hdps',
							'add_tip'=>'添加一个幻灯片',
								'list'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片'),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								),
								'details'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片','help'=>''),
									array('type'=>'link','name'=>'url','from'=>'action','title'=>'幻灯片链接'),
									
								)
						)
					)
			),
			array(
				'title'=>'板块导航',
					'list'=>array(
									array('type'=>'array','name'=>'bankuai','add_tip'=>'添加一个板块导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'image','name'=>'img','title'=>'导航图片'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
			array(
				'title'=>'底部导航',
					'list'=>array(
									array('type'=>'array','name'=>'footernav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标','help'=>'图标，例如：icon-shouye'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
		),
	);
	$return['htmls']=$htmls;
	exi($return);
}
/*******basic*******/
/*******op*******/
